extends "../calxmx_2_2/calxmx_2_2.gd"
func _init():
	pass
func _extInit():
	._extInit()
	chaName = "森罗可兰"                   # 角色的名称
	atkEff = "atk_gongJian" 
	xb = "木"
	lv = 4
	addSkillTxt("[color=#FFFF00][精灵王之风][/color][color=#FFCC22]爆发精灵王之风射出极具威力的一箭，攻击敌方单体造成255%的木系物理伤害\n<束缚>目标3秒，<寄生>目标8秒，并削弱目标任意属性30%，持续3秒[CD:17][/color]")
	addSkillTxt("[color=#FFFF00][精灵王之力][/color][color=#FFCC22]可兰每次释放技能都能获得最大体力4%的护盾[/color]")
	addCdSkill("jlwzf",17)

func _connect():
	connect("onCastCdSkill",self,"run")

func run(id):
	changeShield(att.maxHp*0.04)


func _castCdSkill(id):
	._castCdSkill(id)
	if id == "jlwzf":
		var eff = sys.newEff("numHit", position, false, 1)
		eff.setText("精灵王之风", "#FF0099")
		eff.anim.set_speed_scale(0.2)
		typeHurtCha(aiCha,att.mgiAtk*2.55,Chara.HurtType.PHY,Chara.AtkType.SKILL)
		aiCha.addBuff(bf.shufu.new(3))
		aiCha.addBuff(bf.jisheng.new(8))
		xueruo()

func xueruo():
	var n = sys.rndRan(1,6)
	if n == 1:		
		aiCha.addBuff(wugong3.new(3))
	if n == 2:
		aiCha.addBuff(mogong3.new(3))
	if n == 3:
		aiCha.addBuff(wukang3.new(3))
	if n == 4:
		aiCha.addBuff(mokang3.new(3))
	if n == 5:
		aiCha.addBuff(gongsu3.new(3))
	if n == 6:
		aiCha.addBuff(baoji3.new(3))


		
class huifu:
	extends Buff
	func _init(lv = 1):
		attInit()
		isNegetive=false
		var dispelable = false
		life = lv
		id = "huifu"	
	func _upS():
		masCha.plusHp(masCha.att.maxHp*0.03)

class wugong3:
	extends Buff
	func _init(lv = 1):
		attInit()
		isNegetive=true
		var dispelable = false
		life = lv
		id = "wugong3"	
		att.atkL -= 0.3

class mogong3:
	extends Buff
	func _init(lv = 1):
		attInit()
		isNegetive=true
		var dispelable = false
		life = lv
		id = "mogong3"	
		att.mgiAtkL -= 0.3

class wukang3:
	extends Buff
	func _init(lv = 1):
		attInit()
		isNegetive=true
		var dispelable = false
		life = lv
		id = "wukang3"	
		att.defL -= 0.3

class mokang3:
	extends Buff
	func _init(lv = 1):
		attInit()
		isNegetive=true
		var dispelable = false
		life = lv
		id = "mokang3"	
		att.mgiDefL -= 0.3

class baoji3:
	extends Buff
	func _init(lv = 1):
		attInit()
		isNegetive=true
		var dispelable = false
		life = lv
		id = "baoji3"	
		att.cri -= 0.3

class gongsu3:
	extends Buff
	func _init(lv = 1):
		attInit()
		isNegetive=true
		var dispelable = false
		life = lv
		id = "gongsu3"	
		att.spd -= 0.3